#ifndef __CINI_H__
#define __CINI_H__

#pragma warning(push, 3)
#include "Mkylib.h"
#pragma warning(pop)

class CIniEx
{
public:
	CIniEx(void);
    CIniEx(const tstring strFilePath);
    CIniEx(const tstring strFilePath, const tstring strAppName);
	virtual ~CIniEx(void);

    void    SetIniFilePath(const tstring strFilePath);
    void    SetAppName(const tstring strAppName);
    DWORD   ReadString(const tstring strKeyName, tchar* szBuffer, DWORD dwBufferSize, const tstring strDefaultValue = _T(""));
    BOOL    WriteString(const tstring strKeyName, const tstring strValue);
    int     ReadInt(const tstring strKeyName, int nDefaultValue = 0);
    BOOL    WriteInt(const tstring strKeyName, int nValue);
protected:
    tstring m_strFilePath;
    tstring m_strAppName;
};

#endif